<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
    {include file="Public/header"/}
    <link rel="stylesheet" type="text/css" href="/Hui/icheck/icheck.css">
    <title>基本设置</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span>
    系统管理
    <span class="c-gray en">&gt;</span>
    基本设置
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
    <form class="form form-horizontal" id="form-websit">
        <div id="tab-system" class="HuiTab">
            <div class="tabBar cl">
                <span>基本设置</span>
                <!--<span>邮件设置</span>-->
            </div>
            <div class="tabCon">
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">网站状态：</label>
                    <div class="mt-20 skin-minimal" id="myradio">&nbsp;&nbsp;
                        <div class="radio-box">
                            <input type="radio" id="status1" name="website_status" value="1" {eq name="$websiteInfo['WEBSITE_CLOSE']" value="1"}checked{/eq}>
                            <label for="status1">开启</label>
                        </div>
                        <div class="radio-box">
                            <input type="radio" id="status2" name="website_status" value="0"{eq name="$websiteInfo['WEBSITE_CLOSE']" value="0"}checked{/eq}>
                            <label for="status2">关闭</label>
                        </div>
                    </div>
                </div>
                <div class="row cl website_close_tip" {eq name="$websiteInfo['WEBSITE_CLOSE']" value="1"} style="display: none;"{/eq}>
                    <label class="form-label col-xs-4 col-sm-2">暂停提示：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" id="website_close_tip" name="website_close_tip" value="{$websiteInfo['WEBSITE_CLOSE_TIP']}" class="input-text">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span> 网站名称：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" id="website_title" name="website_title" placeholder="控制在25个字、50个字节以内" value="{$websiteInfo['WEBSITE_TITLE']}" class="input-text">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">关键词：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" id="website_keywords" name="website_keywords" placeholder="用英文,隔开" value="{$websiteInfo['WEBSITE_KEYWORDS']}" class="input-text">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">描述：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <textarea name="website_description" cols="30" rows="10" class="textarea radius" placeholder="网站搜索引擎描述">{$websiteInfo['WEBSITE_DESCRIPTION']}</textarea>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>底部版权信息：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" id="website_copyright" name="website_copyright" placeholder="底部版权信息" value="{$websiteInfo['WEBSITE_COPYRIGHT']}" class="input-text">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">备案号：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" id="website_icp" name="website_icp" placeholder="例如：粤ICP备00000000号" value="{$websiteInfo['WEBSITE_ICP']}" class="input-text">
                    </div>
                </div>
                <div class="row cl">
                    <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                        <input type="hidden" name="id" id="id" value="{$websiteInfo['id']}">
                        <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
                        <!--<button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>-->
                    </div>
                </div>
            </div>
            <!--<div class="tabCon">
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">允许访问后台的IP列表：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <textarea class="textarea" name="" id=""></textarea>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">后台登录失败最大次数：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" class="input-text" value="5" id="" name="" >
                    </div>
                </div>
            </div>-->
            <!--<div class="tabCon">
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">邮件发送模式：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text"  class="input-text" value="" id="" name="">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">SMTP服务器：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" id="" value="" class="input-text">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">SMTP 端口：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" class="input-text" value="25" id="" name="" >
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">邮箱帐号：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" class="input-text" value="5" id="emailName" name="emailName" >
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">邮箱密码：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="password" id="email-password" value="" class="input-text">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">收件邮箱地址：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" id="email-address" value="" class="input-text">
                    </div>
                </div>
            </div>-->
        </div>
    </form>
</div>
{include file="Public/footer" /}

<!--请在下方写此页面业务相关的脚本-->
{include file="Public/expand-js" /}
<script type="text/javascript" src="/Hui/icheck/jquery.icheck.min.js"></script>
<script type="text/javascript">
    $(function () {
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });
        $('#myradio input[name=website_status]').click(function(){
            if ($('#status2').prop('checked')) {
                $('.website_close_tip').css('display','none');
            }else {
                $('.website_close_tip').css('display','block');
            }
        });
        $("#tab-system").Huitab({
            index:0
        });
        $("#form-websit").validate({
            rules:{
                website_title:{
                    required:true
                },
                website_copyright:{
                    required:true
                },
            },
            onkeyup:false,
            focusCleanup:true,
            success:"valid",
            submitHandler:function(form){
                var id = $("input[name='id']").val();
                var WEBSITE_TITLE = $("input[name='website_title']").val();
                var WEBSITE_KEYWORDS = $("input[name='website_keywords']").val();
                var WEBSITE_DESCRIPTION = $("textarea[name='website_description']").val();
                var WEBSITE_ICP = $("input[name='website_icp']").val();
                var WEBSITE_CLOSE = $("input[name='website_status']:checked").val();
                var WEBSITE_CLOSE_TIP = $("input[name='website_close_tip']").val();
                var WEBSITE_COPYRIGHT = $("input[name='website_copyright']").val();
                $.ajax({
                    type: "POST",
                    url: '',
                    data: {
                        'id':id,
                        'WEBSITE_TITLE'      :   WEBSITE_TITLE,
                        'WEBSITE_ICP'        :   WEBSITE_ICP,
                        'WEBSITE_DESCRIPTION':   WEBSITE_DESCRIPTION,
                        'WEBSITE_KEYWORDS'    :   WEBSITE_KEYWORDS,
                        'WEBSITE_CLOSE'      :   WEBSITE_CLOSE,
                        'WEBSITE_CLOSE_TIP'  :   WEBSITE_CLOSE_TIP,
                        'WEBSITE_COPYRIGHT'  :   WEBSITE_COPYRIGHT
                    },
                    success: function(data) {
                        if(data.code)
                        {
                            layer.msg(data.msg,{icon: 1,time:1800},function () {
                                window.location.reload();
                            });
                        }else{
                            layer.msg(data.msg,{icon: 5,time:2000})
                        }
                    },error: function(request) {
                        layer.msg('操作失败',{icon: 2,time:1500})
                    }
                });

            }
        })
    })
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>